export type UserResult = {
  success: boolean;
  data: {
    /** 用户名 */
    username: string;
    /** 当前登陆用户的角色 */
    roles: Array<string>;
    /** `token` */
    accessToken: string;
    /** `accessToken`的过期时间（格式'xxxx/xx/xx xx:xx:xx'） */
    expires: Date;
  };
};

import { AuthApiFactory } from "@/generated";
import { PureHttp } from "@/utils/http";

export const authApi = () =>
  AuthApiFactory(
    undefined,
    import.meta.env.VITE_BASE_URL,
    PureHttp.axiosInstance
  );
